/*
 * @name:
 * @author: wuxd
 * @Date: 2021-03-01 09:09:41
 * @LastEditTime: 2021-04-20 11:56:42
 */
/**
 * @Name:  PDFViewTwo
 * @Author:  https://github.com/mozilla/pdf.js/
 * @Desc:  PDF.JS外部插件
 * @Date: 2021-03-Mo 09:09:44
 */
import React from "react";
import testpdf from "@/assets/NodeDevelopGuide.pdf";
import testpdf01 from "@/assets/这是一个测试文档.pdf";
import testpdf02 from "@/assets/联考.pdf";
import styles from "./styles.module.less";
class PDFViewTwo extends React.Component {
  urls = () => {
    // const url = "http://localhost:8888/web/viewer.html?file=%2Fweb%2Ftest09.pdf";
    const url = window.location.origin + "/lib/pdf/web/viewer.html?file=" + testpdf01;
    console.log("urls===", url);
    return url;
  };
  render() {
    return (
      <div style={{ width: "100%", height: "100vh" }}>
        <iframe src={this.urls()} frameBorder="0" style={{ width: "100%", height: "100%" }} />
      </div>
    );
  }
}
export default PDFViewTwo;
